import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      isShowTab: true
    }
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
    meta: {
      isShowTab: true
    }
  },
  {
    path: '/bargain',
    name: 'bargain',
    component: () => import('../views/bargain.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/renqilist',
    name: 'renqilist',
    component: () => import('../views/renqilist.vue'),
    meta: {
      isShowTab: false
    }
  }
  , {
    path: '/detail',
    name: 'detail',
    component: () => import('../views/detail.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/bargainlist',
    name: 'bargainlist',
    component: () => import('../views/bargainlist.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/Classification',
    name: 'Classification',
    component: () => import('../views/Classification.vue'),
    meta: {
      isShowTab: true
    }
  }
  ,
  {
    path: '/editlist',
    name: "editlist",
    component: () => import('../views/editlist.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/renqidatil',
    name: "renqidatil",
    component: () => import('../views/renqidatil.vue'),
    meta: {
      isShowTab: false
    }
  }
  ,
  {
    path: '/shopping',
    name: 'shopping',
    component: () => import('../views/shopping.vue'),
    meta: {
      isShowTab: true
    }
  },
  {
    path: '/orderlist',
    name: 'orderlist',
    component: () => import('../views/orderlist.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/shopping_list',
    name: 'shopping_list',
    component: () => import('../views/shopping_list.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/registered',
    name: 'registered',
    component: () => import('../views/registered.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: '/personal',
    name: 'personal',
    component: () => import('../views/personal.vue'),
    meta: {
      isShowTab: true
    }
  },
  {
    path: "/Address",
    name: 'Address',
    component: () => import('../views/Address.vue'),
    meta: {
      isShowTab: false
    }
  },
  {
    path: "/myAddress",
    name: 'myAddress',
    component: () => import('../views/myAddress.vue'),
    meta: {
      isShowTab: false
    }
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
